package com.ruoyi.master.domain;

import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 任务对象 t_task
 *
 * @author jiandan
 * @date 2024-06-27
 */
@Data
public class TTask extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 任务ID
     */
    private Long taskId;

    /**
     * 上级任务ID
     */
    private Long parentTaskId;

    /**
     * 任务内容
     */
    @Excel(name = "任务内容")
    private String taskContent;

    /**
     * 持续时长-分钟
     */
    @Excel(name = "持续时长-分钟")
    private Integer durationMin;

    /**
     * 删除标志（0代表存在 2代表删除）
     */
    private String delFlag;

    /**
     * 状态，10为pin，放在首页，20为归档
     */
    private String status;

    /**
     * 是否开放 0否，1是
     */
    private String isOpen;
    /**
     * 创建人
     */
    private String createName;
    /**
     * 点赞数量
     */
    private Long giveLike;

    /**
     * 置顶，数字越小越靠前，默认100
     */
    private Long topNum;

    private String startDate;
    private String endDate;

    private String startUpdateDate;
    private String endUpdateDate;

    /**
     * 权重
     */
    private Integer weight;

    /**
     * 偏离度
     */
    private Float driftRate;

    /**
     * 父任务
     */
    private List<TTask> parent = new ArrayList<>();

    private List<TTaskUp> tTaskUps = new ArrayList<>();

    /** 策略id */
    private Long strategyId;

    /** 策略 */
    private Strategy strategy;


    public void setTaskId(Long taskId) {
        this.taskId = taskId;
    }

    public Long getTaskId() {
        return taskId;
    }

    public void setTaskContent(String taskContent) {
        this.taskContent = taskContent;
    }

    public String getTaskContent() {
        return taskContent;
    }

    public void setDurationMin(Integer durationMin) {
        this.durationMin = durationMin;
    }

    public Integer getDurationMin() {
        return durationMin;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    public String getDelFlag() {
        return delFlag;
    }

    public TTask() {
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("taskId", getTaskId())
                .append("parentTaskId", getParentTaskId())
                .append("taskContent", getTaskContent())
                .append("durationMin", getDurationMin())
                .append("delFlag", getDelFlag())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .append("status", getStatus())
                .append("isOpen", getIsOpen())
                .append("giveLike", getGiveLike())
                .append("topNum", getTopNum())
                .toString();
    }

    public Long getParentTaskId() {
        return parentTaskId;
    }

    public void setParentTaskId(Long parentTaskId) {
        this.parentTaskId = parentTaskId;
    }

    public List<TTask> getParent() {
        return parent;
    }

    public void setParent(List<TTask> parent) {
        this.parent = parent;
    }

    public List<TTaskUp> getTTaskUps() {
        return tTaskUps;
    }

    public void setTTaskUps(List<TTaskUp> tTaskUps) {
        this.tTaskUps = tTaskUps;
    }


    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }
}
